{% extends 'layout.html' %}
{% block style %}
{% endblock %}
{% block body %}
    <div><h3>创建</h3></div>
    <form method="post" action="{{ url_for('add') }}">
    <div class="form-group">
        <input type="text" class="form-control" name="title" placeholder="标题"/>
    </div>
    <div class="form-group">
        <input type="text" class="form-control" name="keyword" placeholder="关键词"/>
    </div>
        <div class="form-group">
        <textarea class="form-control" placeholder="文章内容" id="content" name="content" rows="6" style="height:400px;"></textarea>
        </div>
    <div>
        <button class="btn btn-primary">保存</button>
    </div>
    </form>
{% endblock %}
{% block footer %}
    <script src="{{ url_for('static', filename='script/tinymce/tinymce.min.js') }}"></script>
    <script>
        tinymce.init({
            selector:'#content',
            branding: false,
            menubar: false,
            plugins: ["advlist autolink lists link image charmap print preview anchor",
        "searchreplace visualblocks code fullscreen",
        "insertdatetime media table contextmenu paste imagetools code"],
            toolbar: 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify alignnone | indent outdent | blockquote link image media | code',
            image_list: [
    {title: 'My image 1', value: 'http://www.tinymce.com/my1.gif'},
    {title: 'My image 2', value: 'http://www.moxiecode.com/my2.gif'}
  ],
            images_upload_url: '/image',
  images_upload_base_path: '/some/basepath',
  images_upload_credentials: true,
            paste_data_images: true
        });
    </script>
{% endblock %}
